package com.quan;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

import tk.mybatis.spring.annotation.MapperScan;

@EnableDiscoveryClient
@EnableFeignClients
@EnableCaching
@MapperScan(basePackages = "com.quan.**.mapper")
@SpringBootApplication
public class ApplicationMall implements CommandLineRunner, DisposableBean {

	private static final Logger logger = LoggerFactory.getLogger(ApplicationMall.class);

	public static void main(String[] args) {
		SpringApplication.run(ApplicationMall.class, args);
	}

	@Override
	public void run(String... args) throws Exception {
		logger.info("**********************************************");
		logger.info("Mall-商城管理服务启动.....");
		logger.info("**********************************************");
	}

	@Override
	public void destroy() throws Exception {
		logger.info("**********************************************");
		logger.info("Mall-商城管理服务关闭.....");
		logger.info("**********************************************");
	}
	
}
